package com.swotxu.common.to.es;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * "properties": {
 *    "skuId": {
 *      "type": "long"
 *    },
 *    "spuId": {
 *      "type": "keyword"
 *    },
 *    "skuTitle": {
 *      "type": "text",
 *      "analyzer": "ik_smart"
 *    },
 *    "skuPrice": {
 *      "type": "keyword"
 *    },
 *    "skuImg": {
 *      "type": "keyword",
 *      "index": false,
 *      "doc_values": false
 *    },
 *    "saleCount": {
 *      "type": "long"
 *    },
 *    "hasStock": {
 *      "type": "boolean"
 *    },
 *    "hotScore": {
 *      "type": "long"
 *    },
 *    "brandId": {
 *      "type": "long"
 *    },
 *    "catalogId": {
 *      "type": "long"
 *    },
 *    "brandName": {
 *      "type": "keyword",
 *      "index": false,
 *      "doc_values": false
 *    },
 *    "brandImg": {
 *      "type": "keyword",
 *      "index": false,
 *      "doc_values": false
 *    },
 *    "catalogName": {
 *      "type": "keyword",
 *      "index": false,
 *      "doc_values": false
 *    },
 *    "attrs": {
 *      "type": "nested",
 *      "properties": {
 *        "attrId": {
 *          "type": "long"
 *        },
 *        "attrName": {
 *          "type": "keyword",
 *          "index": false,
 *          "doc_values": false
 *        },
 *        "attrValue": {
 *          "type": "keyword"
 *        }
 *      }
 *    }
 *  }
 * @Date: 2021/1/15 21:54
 * @Author: swotXu
 */
@Data
public class SkuESModel {
    private Long spuId;
    private Long skuId;
    /**
     * 商品名
     */
    private String skuTitle;
    /**
     * 价格
     */
    private BigDecimal skuPrice;
    /**
     * 商品图片
     */
    private String skuImg;
    /**
     * 销量
     */
    private Long saleCount;
    /**
     * 是否有库存
     */
    private Boolean hasStock;
    /**
     * 热度评分
     */
    private Long hotScore;
    /**
     * 品牌ID
     */
    private Long brandId;
    /**
     * 品牌名
     */
    private String brandName;
    /**
     * 品牌图片
     */
    private String brandImg;
    /**
     * 分类Id
     */
    private Long catalogId;
    /**
     * 分类名
     */
    private String catalogName;
    /**
     * 规格属性
     */
    private List<AttrESModel> attrs;

    @Data
    public static class AttrESModel {
        private Long attrId;
        private String attrName;
        private String attrValue;
    }
}
